<p class="Paragraph">FileNumber : Any integer expression that specifies the number of the data channel opened with the <span class="T1">Open</span> statement.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleWorkWithAFile</p>
<p class="PropText">Dim iNumber As Integer</p>
<p class="PropText">Dim sLine As String</p>
<p class="PropText">Dim aFile As String</p>
<p class="PropText">Dim sMsg as String</p>
<p class="PropText">aFile = "c:\data.txt"</p>
<p class="PropText">sMsg = = ""</p>
<p class="PropText">iNumber = Freefile</p>
<p class="PropText">Open aFile For Output As #iNumber</p>
<p class="PropText">Print #iNumber, "First line of text"</p>
<p class="PropText">Print #iNumber, "Another line of text"</p>
<p class="PropText">Close #iNumber</p>
<p class="PropText"/>
<p class="PropText">iNumber = Freefile</p>
<p class="PropText">Open aFile For Input As iNumber</p>